package org.mspring.platform.dao.query;


/**
 * @author Gao Youbo
 * @since Jan 31, 2012
 */
public class QueryHelper {

    public static boolean isValidHql(String hqlString) {
        boolean isBlank = org.apache.commons.lang3.StringUtils.isBlank(hqlString);
        if (isBlank) {
            return false;
        }
        return !hqlString.equals("()");
    }

    public static String qualifyHql(String str) {
        return str.replace('.', '_');
    }

    public static String qualifyHql(String str, String prefix) {
        return prefix.concat(str.replace('.', '_'));
    }
}
